import { ModuleWithProviders, NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { bookListComponent } from '../biz/book-list-component/book-list.component';
import { BookCatalogueComponent } from '../biz/book-catalogue-component/book-catalogue.component';
import { DashboardComponent } from '../biz/dashboard-component/dashboard.component';
import { CatalogueDetailComponent } from '../biz/catalogue-detail-component/catalogue-detail.component';
import { LoginComponent } from '../biz/login-component/login.component';

const appRoutes: Routes = [

    // {
    //     path: 'booklist',
    //     component: bookListComponent
    // },
    {
        path: '',
        redirectTo: '/bookcatalogue',
        pathMatch: 'full'
        //component: MyDemoComponent
    },
    {
        path: 'login',
        component: LoginComponent
    },
    {
        path: 'bookcatalogue',
        component: BookCatalogueComponent
    },
    {
        path: 'detail/:id',
        component: CatalogueDetailComponent
    },
    {
        path: 'dashboard',
        component: DashboardComponent
    },
    {
        path: 'booklist',
        loadChildren: '../biz/book-list-component/book-list.module#bookListModule'
    },
    // {
    //     path: 'login',
    //     component: IndexComponent

    // },
    // {
    //     path:'menu-test',
    //     component:TestMenuComponent
    // },
    //  {
    //     path:'menuTap-test',
    //     component:TestMenuTapComponent
    // },
];

@NgModule({
    imports: [RouterModule.forRoot(appRoutes)],
    exports: [RouterModule]
})

export class AppRoutingModule { }
// export const Routing: ModuleWithProviders = RouterModule.forRoot(appRoutes);